<template>
    <div class="JGLogger-manage-template">
        <JGLoggerDefault v-if="curPath.startsWith('default')" ref="JGLoggerDefault"></JGLoggerDefault>
        <JGLoggerCreate v-if="curPath.startsWith('create')" ref="JGLoggerCreate"></JGLoggerCreate>
    </div>
</template>

<script>
    import JGLoggerDefault from "../default/JGLoggerDefault";
    import JGLoggerCreate from "../create/JGLoggerCreate";

    export default {
        name: "JGLoggerManage",
        components: {JGLoggerDefault, JGLoggerCreate},
        data() {
            return {
                curPath: 'default'
            }
        },
        methods: {
            getWorkNo() {
                let number = this.curPath.split('@')[1];
                console.log(number)
            }
        },
        watch: {
            curPath() {
                this.getWorkNo();
            }
        }
    }
</script>

<style lang="scss">
    .JGLogger-manage-template {
        background-color: #ffffff;
        width: 100%;
        height: 100%;
    }
</style>